﻿Public Class altcalc

    Public Function smpCalc(ByRef CatDay As Integer, ByRef Distance As Double, ByRef TotTons As Integer)
        Try
            Select Case CatDay
                Case Is = 1
                    Return "Please see the helpfile regarding Category 1 day."
                Case 2
                    Select Case Distance
                        Case Is <= 0.19
                            Return "Recommend DO NOT BURN."
                        Case 0.2 To 4.9
                            Select Case TotTons
                                Case Is <= 488
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 488
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 5 To 9.9
                            Select Case TotTons
                                Case Is <= 1000
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 1000
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 10 To 19.9
                            Select Case TotTons
                                Case Is <= 1840
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 1840
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 20 To 29.9
                            Select Case TotTons
                                Case Is <= 2880
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 2880
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case Is > 29
                            Return "Your burn will NOT exceed the guidelines"
                    End Select
                Case 3
                    Select Case Distance
                        Case Is <= 0.19
                            Return "Recommend DO NOT BURN"
                        Case 0.2 To 4.9
                            Select Case TotTons
                                Case Is <= 560
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 560
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 5 To 9.9
                            Select Case TotTons
                                Case Is <= 1200
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 1200
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 10 To 19.9
                            Select Case TotTons
                                Case Is <= 2240
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 2240
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 20 To 29.9
                            Select Case TotTons
                                Case Is <= 3280
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 3280
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case Is > 29
                            Return "Your burn will NOT exceed the guidelines"
                    End Select
                Case 4
                    Select Case Distance
                        Case Is <= 0.19
                            Return "Recommend DO NOT BURN"
                        Case 0.2 To 4.9
                            Select Case TotTons
                                Case Is <= 720
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 720
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 5 To 9.9
                            Select Case TotTons
                                Case Is <= 1840
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 1840
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 10 To 19.9
                            Select Case TotTons
                                Case Is <= 4200
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 4200
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 20 To 29.9
                            Select Case TotTons
                                Case Is <= 6400
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 6400
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case Is > 29
                            Return "Your burn will NOT exceed the guidelines"
                    End Select
                Case 5
                    Select Case Distance
                        Case Is <= 0.19
                            Return "Recommend DO NOT BURN"
                        Case 0.2 To 4.9
                            Select Case TotTons
                                Case Is <= 1280
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 1280
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 5 To 9.9
                            Select Case TotTons
                                Case Is <= 3200
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 3200
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 10 To 19.9
                            Select Case TotTons
                                Case Is <= 7200
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 7200
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case 20 To 29.9
                            Select Case TotTons
                                Case Is <= 11600
                                    Return "Your burn will NOT exceed the guidelines"
                                Case Is > 11600
                                    Return "Your burn WILL exceed the guidelines"
                            End Select
                        Case Is > 29
                            Return "Your burn will NOT exceed the guidelines"
                    End Select
            End Select
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try

    End Function




    Public Function smpCalc2(ttons As Integer, tDistance As Double, tCat As Integer)

        Return "Your burn will exceed because the Total Tons **" & ttons & _
                                              "** exceeds the available tons given the distance to the nearest target " & tDistance & _
                                              " (miles) on a Category " & tCat & " day!"

    End Function


End Class
